<?php

declare (strict_types=1);
namespace App\Model;

use App\Library\Common;
use Hyperf\DbConnection\Model\Model;
/**
 */
class ScmFileinfo extends Model
{


    const CREATED_AT = 'createtime';
    const UPDATED_AT = 'updatetime';
    public $timestamps = true;
    protected $dateFormat = 'U';
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'fileinfo';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [];

    protected $appends=[
        'fullurl'
    ];

    public function getFullurlAttribute($value)
    {
        $url=$this->getAttribute('url');
        if($url){
            return  Common::cdnurl($url);
        }

    }
}